import request from '@/utils/request'
/**
 * 获取角色信息
 * @returns
 */
export const getRoles = (params) => {
  return request({
    url: '/api/sys/role',
    method: 'get',
    params
  })
}
/**
 * 删除角色信息
 * @returns
 */
export const delRoles = (id) => {
  return request({
    url: `/api/sys/role/${id}`,
    method: 'delete'
  })
}
/**
 * 添加角色信息
 * @returns
 */
export const addRoles = (data) => {
  return request({
    url: `/api/sys/role`,
    method: 'post',
    data
  })
}
/**
 * 根据id编辑角色信息
 * @returns
 */
export const editRoles = (data) => {
  return request({
    url: `/api/sys/role/${data.id}`,
    method: 'put',
    data
  })
}

